class Exploitdb < Formula
  desc "The official Exploit Database"
  homepage "https://www.exploit-db.com/"
  url "https://github.com/offensive-security/exploit-database.git",
      :tag => "2017-11-04",
      :revision => "8194245b20906070574b5c87a3afd5d08618fa9c"
  version "2017-11-04"
  head "https://github.com/offensive-security/exploit-database.git"

  bottle :unneeded

  def install
    inreplace "searchsploit", "gitpath=\"/opt/exploit-database\"", "gitpath=\"#{pkgshare}\""
    bin.install "searchsploit"
    pkgshare.install %w[files.csv platforms .git]
  end

  test do
    system "#{bin}/searchsploit", "sendpage"
  end
end
